﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// System_Fields数据模型对象
    /// </summary>
    [Serializable]
    public partial class System_FieldsMod
    {
        /// <summary>
        /// 初始化System_Fields数据模型对象
        /// </summary>
        public System_FieldsMod()
        {
            
        }
        /// <summary>
        /// 初始化System_Fields数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="tablename">tablename</param>
        /// <param name="fieldname">fieldname</param>
        /// <param name="xtype">xtype</param>
        /// <param name="dictid">dictid</param>
        /// <param name="fielddesc">fielddesc</param>
        public System_FieldsMod(long iD,string tablename,string fieldname,string xtype,string dictid,string fielddesc)
        {
            //给ID字段赋值
            this.ID = iD;
            //给tablename字段赋值
            this.Tablename = tablename;
            //给fieldname字段赋值
            this.Fieldname = fieldname;
            //给xtype字段赋值
            this.Xtype = xtype;
            //给dictid字段赋值
            this.Dictid = dictid;
            //给fielddesc字段赋值
            this.Fielddesc = fielddesc;
        }
        /// <summary>
        /// 初始化System_Fields数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="tablename">tablename</param>
        /// <param name="fieldname">fieldname</param>
        /// <param name="xtype">xtype</param>
        /// <param name="dictid">dictid</param>
        /// <param name="fielddesc">fielddesc</param>
        /// <param name="autoFill">AutoFill</param>
        public System_FieldsMod(long iD,string tablename,string fieldname,string xtype,string dictid,string fielddesc,string autoFill)
        {
            //给ID字段赋值
            this.ID = iD;
            //给tablename字段赋值
            this.Tablename = tablename;
            //给fieldname字段赋值
            this.Fieldname = fieldname;
            //给xtype字段赋值
            this.Xtype = xtype;
            //给dictid字段赋值
            this.Dictid = dictid;
            //给fielddesc字段赋值
            this.Fielddesc = fielddesc;
            //给AutoFill字段赋值
            this.AutoFill = autoFill;
        }
        
		//属性存储数据的变量
        private long _iD;
        private string _tablename;
        private string _fieldname;
        private string _xtype;
        private string _dictid;
        private string _fielddesc;
        private string _autoFill;
        
        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// tablename
        /// </summary>
        public string Tablename
        {
            get { return this._tablename; }
            set { this._tablename = value; }
        }
        /// <summary>
        /// fieldname
        /// </summary>
        public string Fieldname
        {
            get { return this._fieldname; }
            set { this._fieldname = value; }
        }
        /// <summary>
        /// xtype
        /// </summary>
        public string Xtype
        {
            get { return this._xtype; }
            set { this._xtype = value; }
        }
        /// <summary>
        /// dictid
        /// </summary>
        public string Dictid
        {
            get { return this._dictid; }
            set { this._dictid = value; }
        }
        /// <summary>
        /// fielddesc
        /// </summary>
        public string Fielddesc
        {
            get { return this._fielddesc; }
            set { this._fielddesc = value; }
        }
        /// <summary>
        /// AutoFill
        /// </summary>
        public string AutoFill
        {
            get { return this._autoFill; }
            set { this._autoFill = value; }
        }
        
        /// <summary>
        /// 对比两个System_Fields数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的System_Fields数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成System_Fields数据模型对象
            System_FieldsMod system_FieldsMod = obj as System_FieldsMod;
            //判断是否转换成功
            if (system_FieldsMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == system_FieldsMod.ID &&
                //判断tablename是否一致
                this.Tablename == system_FieldsMod.Tablename &&
                //判断fieldname是否一致
                this.Fieldname == system_FieldsMod.Fieldname &&
                //判断xtype是否一致
                this.Xtype == system_FieldsMod.Xtype &&
                //判断dictid是否一致
                this.Dictid == system_FieldsMod.Dictid &&
                //判断fielddesc是否一致
                this.Fielddesc == system_FieldsMod.Fielddesc &&
                //判断AutoFill是否一致
                this.AutoFill == system_FieldsMod.AutoFill;
        }
        /// <summary>
        /// 将当前System_Fields数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将System_Fields数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将tablename进行按位异或运算处理
                (this.Tablename == null ? 2147483647 : this.Tablename.GetHashCode()) ^
                //将fieldname进行按位异或运算处理
                (this.Fieldname == null ? 2147483647 : this.Fieldname.GetHashCode()) ^
                //将xtype进行按位异或运算处理
                (this.Xtype == null ? 2147483647 : this.Xtype.GetHashCode()) ^
                //将dictid进行按位异或运算处理
                (this.Dictid == null ? 2147483647 : this.Dictid.GetHashCode()) ^
                //将fielddesc进行按位异或运算处理
                (this.Fielddesc == null ? 2147483647 : this.Fielddesc.GetHashCode()) ^
                //将AutoFill进行按位异或运算处理
                (this.AutoFill == null ? 2147483647 : this.AutoFill.GetHashCode());
        }
        /// <summary>
        /// 将当前System_Fields数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前System_Fields数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将tablename转换成字符串
                this.Tablename + "," +
                //将fieldname转换成字符串
                this.Fieldname + "," +
                //将xtype转换成字符串
                this.Xtype + "," +
                //将dictid转换成字符串
                this.Dictid + "," +
                //将fielddesc转换成字符串
                this.Fielddesc +
                "]";
        }
    }
}
